

<template>
  <div class="op-btn">
    <el-button type="text" size="small"   @click="getDetial">查看</el-button>
    <el-drawer
        title="查看API"
        :size="800"
        :wrapperClosable="false"
        :destroy-on-close="true"
        :visible.sync="drawer">
      <apiForm ref="apiForm"></apiForm>
    </el-drawer>
  </div>
</template>

<script>
import apiForm from "@/views/APImanage/module/apiForm";
export default {
  name: "seeApiBtn",
  components:{
    apiForm
  },
  props:{
    params:{
      default:()=>{}
    }
  },
  methods:{
    getDetial(){
      this.drawer = true
      this.$nextTick(()=>{
        this.$refs.apiForm.setData(this.params)
      })
    },
  },
  data(){
    return {
      drawer:false
    }
  },
}
</script>

<style scoped lang="less">

</style>